package com.xjj.datarources.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjj.datarources.dao.RoleMapper;
import com.xjj.datarources.pojo.SysRole;
import com.xjj.datarources.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @name: xjj
 * @date: 2021/5/25 15:40
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, SysRole> implements RoleService {

    @Resource
    private RoleMapper roleMapper;


    @Override
    public List<SysRole> getRolesByUid(Integer uid) {

/*        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("uid", uid);

        return roleMapper.selectList(queryWrapper);*/
        return roleMapper.getRole(uid);

    }
}
